package com.jiutong.meipenggang.http.model.services;

import com.jiutong.meipenggang.common.Constants;
import com.jiutong.meipenggang.entity.BaseBean;
import com.jiutong.meipenggang.entity.GestureLoginBean;
import com.jiutong.meipenggang.entity.LoginBean;
import com.jiutong.meipenggang.entity.ProvinceAndCityBean;
import com.jiutong.meipenggang.entity.RegisterBean;
import com.jiutong.meipenggang.entity.ServiceAgreementBean;

import java.util.Map;

import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;

/**
 * Created by suxi on 2017/5/27.
 */

public interface UserInfoService {

    /**
     * 注册
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.SERVICES)
    Observable<RegisterBean> register(@FieldMap Map<String, Object> fields);

    /**
     * 登录
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.SERVICES)
    Observable<LoginBean> login(@FieldMap Map<String, Object> fields);

    /**
     * 获取验证码
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.SERVICES)
    Observable<BaseBean> getAuthCode(@FieldMap Map<String, Object> fields);


    /**
     * 忘记密码
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.SERVICES)
    Observable<BaseBean> forgetPwd(@FieldMap Map<String, Object> fields);


    /**
     * 用验证码修改密码
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.SERVICES)
    Observable<BaseBean> pwdResetByCode(@FieldMap Map<String, Object> fields);

    /**
     * 服务协议
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.SERVICES)
    Observable<ServiceAgreementBean> serviceAgreement(@FieldMap Map<String, Object> fields);

    /**
     * 省市列表
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.SERVICES)
    Observable<ProvinceAndCityBean> getCityList(@FieldMap Map<String, Object> fields);

    /**
     * 手势密码登录
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.SERVICES)
    Observable<GestureLoginBean> gestureLogin(@FieldMap Map<String, Object> fields);

    /**
     * 手势密码修改
     * @param fields
     * @return
     */
    @FormUrlEncoded
    @POST(Constants.SERVICES)
    Observable<BaseBean> gestureChange(@FieldMap Map<String, Object> fields);


}
